package com.tuanzi.loan.web.lazy.family;

import org.springframework.data.domain.Page;

import com.tuanzi.loan.business.service.sms.SmsSendTaskService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.SmsSendTaskSearchRequest;
import com.tuanzi.loan.vo.response.family.SmsSendTaskSearchResponse;

/**
 * @author Ray 2017/09/21
 */
public class SmsSendTaskLazyDataModel extends BaseLazyDataModel<SmsSendTaskSearchRequest, SmsSendTaskSearchResponse> {

	private static final long serialVersionUID = 9143007553234885156L;

	private SmsSendTaskService smsSendTaskService = SpringContextHolder.getBean(SmsSendTaskService.class);

	public SmsSendTaskLazyDataModel(SmsSendTaskSearchRequest searchRequest) {
		super(searchRequest);
	}

	@Override
	protected Page<SmsSendTaskSearchResponse> doLoad(PageSearcher<SmsSendTaskSearchRequest> pageSearcher) {
		return smsSendTaskService.list(pageSearcher);
	}
}
